<%--
  Created by IntelliJ IDEA.
  User: 29787
  Date: 2020/10/4
  Time: 16:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>URL删除数据库的数据</title>
</head>
<style>
    #one{
        display: block;
    }
</style>
<script>
    function getText(obj)
    {
        if(obj.name==1)
            document.getElementById("studentNames").value="ZhangSan";
        else
            document.getElementById("studentNames").value="LiSi";

    }
</script>
<body>

<form name="form1" action="demo5" method="get">
<input type="text" size="20"  value="张三">
<a name="1" href=javascript:form1.submit();  onclick="getText(this)" >删除</a>
<br>

<input type="text" size="20"  value="李四">
<a href=javascript:form1.submit(); name="2" onclick="getText(this)" >删除</a>
<br>
<input type="text" id="studentNames" name="studentName">
</form>
</body>
</html>
